﻿<div class="row">
    <div class="col-xs-12 col-md-12 col-lg-12">
        <div class="widget">
            <div class="widget-header bg-blue">
            	<i class="widget-icon fa fa-arrow-left"></i>
                <span class="widget-caption">管理员设置</span>
                <div class="widget-buttons">
                    <a href="#" data-toggle="maximize">
                        <i class="fa fa-expand"></i>
                    </a>
                    <a href="#" data-toggle="collapse">
                        <i class="fa fa-minus"></i>
                    </a>
                    <a href="#" data-toggle="dispose">
                        <i class="fa fa-times"></i>
                    </a>
                </div>
            </div>
            <div class="widget-body" style="height: auto;">
				
				<div class="form-title">
                    <a href="{:U('Admin/User/index')}" class="btn btn-primary" data-loader="bb-loader" data-loadername="管理员管理">
						<i class="fa fa-mail-reply"></i>返回
					</a>
                </div>
                
                <form id="bbForm" action="" method="post" class="form-horizontal"
                                                  data-bv-message=""
                                                  data-bv-feedbackicons-valid="glyphicon glyphicon-ok"
                                                  data-bv-feedbackicons-invalid="glyphicon glyphicon-remove"
                                                  data-bv-feedbackicons-validating="glyphicon glyphicon-refresh">
                <input type="hidden" name="id" value="{$cache.id}">

				<div class="form-group">
				    <label class="col-lg-2 control-label">昵称<sup>*</sup></label>
				    <div class="col-lg-4">
				    <input type="text" class="form-control" name="name" placeholder="必填"
				                                           data-bv-notempty="true"
				                                           data-bv-notempty-message="不能为空" value="{$cache.name}">
				    </div>
				</div>
				
				<div class="form-group">
	                    <label class="col-lg-2 control-label">头像</label>
	                    <div class="col-lg-4">
	                    	<div class="input-group input-group-sm">
	                    		<input type="text" class="form-control" name="img" id="bb-img" value="{$cache.img}" >
	                    		<span class="input-group-btn">
	                        		<button class="btn btn-default shiny" type="button" onclick="Imgviewer('bb-img')"><i class="fa fa-camera-retro"></i>预览</button><button class="btn btn-default shiny" type="button" onclick="Imguploader('bb-img',false)"><i class="glyphicon glyphicon-picture"></i>上传</button>
	                    		</span>
	                    	</div>
	                    </div>
	            </div>
	            
	            <div class="form-group">
				    <label class="col-lg-2 control-label">邮箱</label>
				    <div class="col-lg-4">
				    	<input type="text" class="form-control" name="mail" value="{$cache.mail}">
				    </div>
				</div>
	            
				<div class="form-group">
				    <label class="col-lg-2 control-label">所属角色<sup>*</sup></label>
				    <div class="col-lg-4">
				    	<select name="role">
				    		<volist name="role" id="vo">
                        		<option value="{$vo.id}" <eq name="vo.id" value="$cache['role']" > selected="selected" </eq> > {$vo.title} </option>
                        	</volist>
				    	</select>
				    </div>
				</div>
				
				<div class="form-group">
				    <label class="col-lg-2 control-label">登录名<sup>*</sup></label>
				    <div class="col-lg-4">
				    	<input type="text" class="form-control" name="user" placeholder="必填"
				                                           data-bv-notempty="true"
				                                           data-bv-notempty-message="不能为空" value="{$cache.user}">
				    </div>
				</div>
				
				<div class="form-group">
				    <label class="col-lg-2 control-label">密码<sup>*</sup></label>
				    <div class="col-lg-4">
				    	<input type="password" class="form-control" name="pass" >
				    </div>
				</div>
				
				<div class="form-group">
				    <label class="col-lg-2 control-label">确认密码<sup>*</sup></label>
				    <div class="col-lg-4">
				    	<input type="password" class="form-control" name="pass2" >
				    </div>
				</div>
				
               <div class="form-group">
                         <div class="col-lg-offset-2 col-lg-4">
                         <button class="btn btn-primary btn-lg" type="submit">保存</button>&nbsp;&nbsp;&nbsp;&nbsp;
                         <button class="btn btn-palegreen btn-lg" type="reset">重填</button>
                    </div>
                </div>
                
            </div>
        </div>
    </div>
</div>
          
<!--面包屑导航封装-->
<div id="tmpbread" style="display: none;">{$breadhtml}</div>
<script type="text/javascript">
	setBread($('#tmpbread').html());
</script>

<!--表单验证与提交封装-->
<script type="text/javascript">
	$('#bbForm').bootstrapValidator({
		submitHandler: function (validator, form, submitButton) {
           var tourl="{:U('Admin/User/set')}";
           var data=$('#bbForm').serialize();
           $.bb.ajax('post',tourl,data,null);
           return false;
        },
	});
</script>



<!--/表单验证与提交封装-->